-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dist state mgmt #90
Open
sschwarzmann
wants to merge
43
commits into
Fraunhofer-AISEC:master
Choose a base branch
from
sschwarzmann:dist_state_mgmt
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Dist state mgmt #90
sschwarzmann
wants to merge
43
commits into
Fraunhofer-AISEC:master
from
sschwarzmann:dist_state_mgmt
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MIPS removed by Rust due to rust-lang/rust#115218
lms.yml action/job shall also be triggered by this branch.
- Last change (replace "set-output" by $GITHUB_OUTPUT) caused an error. - replace checkout@v2 by checkout@v4 due to https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Replace (as suggested in online discussions) with "dtolnay/rust-toolchain" due to deprecated node12. See: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/ https://github.com/dtolnay/rust-toolchain
- contains just the module structure - adapt lib.rs
Add "mod helper" to sst/mod.rs to integrate/build/test new file helper.rs.
For all "HssParameter"s, only one top part height for "dividing" one tree is needed.
Leave it to "sst_demo"-caller to provide different seeds.
- Use "REF_IMPL_MAX_ALLOWED_HSS_LEVELS" instead of magic number for max HSS size. - Add new call argument for demo (two-step key generation)
Adapt LmsPrivateKey so the restricted number of leaves and instance number can be considered.
Dep. on signing entity, tree height and division, calc. and set first and last LMS leaf to limited values.
First set of arguments can optionally have top_height and entity_number. If one is provided, the other is mandatory. If not provided, behaviour is as previously (HSS).
- extension not written to file yet - keys are used as before - tests are still working
- 2 Bytes used for top_height and signing_entity - calling with parameters 0/0 for those values results in same behaviour as before
- "node value" is the hash value calc. via get_tree_element() depending in the root node of the signing instance's single-sub-tree
- adapt AUX data: add level for signing entity nodes; ignore levels "above" - generate the correct VerifyingKey: replace our own ID 1 "pubkey" value with node value calc. via intermediate SI nodes - use separate files for different signing entities numbers (aux, prv, pub) - extend arguments for demo code
- improve and clean up example code and API calls to lib code - add adapted HssPublicKey "from()" method for SST to adapt AUX data, - store other nodes intermediate data in AUX data - use public key generated via signing entity intermediate nodes in HssPublicKey - fix sst helper functions
- Generate keys for several signing entities (via parameter)
- provide number of signing instances instead of "top_div_height" - provide SSTS parameter separately
- partially populate AUX data in gen key step 1 - read/use and extend AUX data in gen key step 2 - fix AUX data (finalize, write HMAC) - adapt AUX arguments for py script and sst_demo -
- fix for "tree identifier": the value needs to be the same for all signing entities - create tree ident. via first signing entity, then use this tree ident. for other entities - here the temp. solution is a fixed value for the treee ident. - fix for "used leafs": the position of the used lefas value in the u64 "CompressedUsedLeafsIndexes" and in the HSS levels array was wrong if several HSS levels were used
- build strings via f-string (improve readability) - format code - add requirements.txt (so far empty) to communicate python environment
- rename some constants, variables and functions to reflect their purpose - remove obsolete comments - remove unused functions - format via "cargo fmt"
Simplification is possible because AUX data is filled before calculating the "LmsPublicKey", so the "real" public key can now be calculated straight via "LmsPublicKey" with index 1. Before we used the LmsPublicKey with sst extension and index != 1 which would result in the intermediate node value.
Use common tree identifier (RFC: "I") so that the key generation and signing all use the same value (as opposed to using different values dep. on their different seeds).
- rename "top_div_height" -> "l0_top_div" - comments to indicate TODOs, review, questions...
All files under " res/nrf52-arm/". See res/nrf52-arm/README.md for instructions.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes to fix GitHub CI actions:
change
PhantomData::Default()
toPhantomData
as suggested byrustc
remove MIPS toolchain (removed in rust's default cross installation)
replace
set_output
by$GITHUB_OUTPUT
replace
checkout@v2
bycheckout@v4
replace GitHub's outdated rust
actions-rs
bydtolnay/rust-toolchain
The rustc 1.57 still causes troube
maybe also the actions from
dtolnay/rust-toolchain
More infos in commits.
There's one change that may not be desired: the branch
dist_state_mgmt
is added for CI